﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace Slja.WEB.Web.Project.RunningAccount
{
    /// <summary>
    /// RunAccoData 的摘要说明
    /// </summary>
    public class RunAccoData : IHttpHandler
    {
       
        public void ProcessRequest(HttpContext context)
        {
            string data = "";
            string PrjType = context.Request["PrjType"];
            if (!string.IsNullOrEmpty(PrjType))
            {
                string TableName = RunningAccountUtil.IMPORT_TABLENAME + "_" + PrjType;
                DataTable dt = new BLL.ImportData().GetTableDataByName(TableName);
                string DataString = RunningAccountUtil.Json4ExtjsFromDatatable(dt);

                context.Response.ContentType = "text/x-javascript";
                context.Response.Write(DataString);
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}